package com.cn.wanxi.service;

import com.cn.wanxi.model.NewsModel;

import java.util.ArrayList;
import java.util.List;

public class NewsService {
    public List<NewsModel> getNewsModelList() {
        List<NewsModel> list = new ArrayList<>();
        NewsModel newsModel = new NewsModel();

        for (int i = 0; i < newsModel.srcList.size(); i++) {
            NewsModel model = new NewsModel();
            model.setSrc(newsModel.srcList.get(i));
            model.setTitle(newsModel.titleList.get(i));
            model.setContent(newsModel.contentList.get(i));
            model.setHref(newsModel.hrefList.get(i));
            list.add(model);
        }
        return list;
    }
}
